﻿<Window x:Class="AdminMainUI.ConfigWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Cache Configuration" Height="416" Width="698" Icon="/Appfabric Administrator;component/Images/server.ico">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="166*" />
            <RowDefinition Height="161*" />
        </Grid.RowDefinitions>
        <Label Content="Cache Name:" Height="28" HorizontalAlignment="Left" Margin="10,6,0,0" Name="label1" VerticalAlignment="Top"/>
        <Label Content="Eviction:" Height="28" HorizontalAlignment="Left" Margin="10,40,0,0" Name="label2" VerticalAlignment="Top" />
        <Label Content="Expirable:" HorizontalAlignment="Left" Margin="11,74,0,0" Name="label3" Height="28" VerticalAlignment="Top" />
        <Label Content="High Availability:" Height="28" HorizontalAlignment="Left" Margin="10,140,0,0" Name="label4" VerticalAlignment="Top" Grid.RowSpan="2" />
        <Label Content="Notifications:" Height="28" HorizontalAlignment="Left" Margin="11,170,0,0" Name="label7" VerticalAlignment="Top" Grid.RowSpan="2" />
        <Label Content="Persist Secondary:" Height="28" HorizontalAlignment="Left" Name="label8" VerticalAlignment="Top" Margin="306,170,0,0" Grid.RowSpan="2" />
        <Label Content="Time To Live:" Height="28" HorizontalAlignment="Left" Name="label11" VerticalAlignment="Top" Margin="10,108,0,0" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="117,12,0,0" Name="txtCacheName" VerticalAlignment="Top" Width="160" TabIndex="0" ToolTip="The name of the cache. This is the only required parameter." />

        <Label Content="Provider Settings:" Height="28" HorizontalAlignment="Left" Margin="13,45,0,0" Name="label5" VerticalAlignment="Top" Grid.Row="1" />
        <Label Content="Provider Type:" Height="28" HorizontalAlignment="Left" Margin="12,12,0,0" Name="label6" VerticalAlignment="Top" Grid.Row="1" />
        <Label Content="Read Through:" Height="28" HorizontalAlignment="Left" Margin="304,6,0,0" Name="label9" VerticalAlignment="Top" />
        <Label Content="Write Behind:" Height="28" HorizontalAlignment="Left" Margin="304,40,0,0" Name="label10" VerticalAlignment="Top" />
        <Label Content="Write Behind Interval:" Height="28" HorizontalAlignment="Left" Name="label12" VerticalAlignment="Top" Margin="304,74,0,0" />
        <Label Content="Write Behind Retry Count:" Height="28" HorizontalAlignment="Left" Name="label13" VerticalAlignment="Top" Margin="306,108,0,0" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="117,45,0,0" Name="cmbEviction" VerticalAlignment="Top" Width="160" TabIndex="1" ToolTip="Uses Least Recently Used eviction. A value of None may cause a cache host to run out of memory.">
            <ComboBoxItem Content="LRU" IsSelected="True" />
            <ComboBoxItem Content="None" />
        </ComboBox>
        <CheckBox Height="16" HorizontalAlignment="Left" Margin="117,79,0,0" Name="chkExpirable" VerticalAlignment="Top" IsChecked="True" TabIndex="3" ToolTip="Specifies whether items in the cache are expirable." />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="117,108,0,0" Name="txtTtl" Text="10" VerticalAlignment="Top" Width="47" TabIndex="4" ToolTip="The expiration timeout minutes for items in the cache."/>
        <Label Content="minutes" Height="28" HorizontalAlignment="Left" Margin="170,106,0,0" Name="label14" VerticalAlignment="Top" />
        <CheckBox Height="16" HorizontalAlignment="Left" Margin="117,145,0,0" Name="chkHA" VerticalAlignment="Top" TabIndex="5" ToolTip="Enable high availability feature." />
        <CheckBox Height="16" HorizontalAlignment="Left" Margin="487,175,0,0" Name="chkPersistSecondary" VerticalAlignment="Top" TabIndex="12"  ToolTip="Requires high availability to be enabled. If enabled, the secondary copy of the item must also be persisted for the write operation to succeed."/>
        <CheckBox Height="16" HorizontalAlignment="Left" Margin="117,177,0,0" Name="chkNotifications" VerticalAlignment="Top" TabIndex="6" Grid.RowSpan="2" ToolTip="Enable cache notifications" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="150,47,0,0" Name="txtPKey" VerticalAlignment="Top" Width="83" Grid.Row="1" TabIndex="15" ToolTip="The key of the key/value pair to be added to provider settings."/>
        <CheckBox Height="16" HorizontalAlignment="Left" Margin="487,12,0,0" Name="chkReadThrough" VerticalAlignment="Top" TabIndex="7" ToolTip="Use this parameter to enable the read-through feature."/>
        <CheckBox Height="16" HorizontalAlignment="Left" Margin="487,45,0,0" Name="chkWriteBehind" VerticalAlignment="Top" TabIndex="8" ToolTip="Use this parameter to enable the write behind feature."/>
        <TextBox Height="23" Text="300" HorizontalAlignment="Left" Margin="487,79,0,0" Name="txtWBInterval" VerticalAlignment="Top" Width="47" TabIndex="9" ToolTip="The number of seconds by which time a cache item should be written to the provider after being written to the cache." />
        <TextBox Height="23" Text="-1" HorizontalAlignment="Left" Margin="487,110,0,0" Name="txtRBCount" VerticalAlignment="Top" Width="47" TabIndex="10" ToolTip="The maximum number of connection retries to the write-behind provider. The default is -1, which means inifinite retries."/>
        <Label Content="seconds" Height="28" HorizontalAlignment="Left" Margin="540,77,0,0" Name="label15" VerticalAlignment="Top" />
        <TextBox Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="117,14,0,0" Name="txtPType" VerticalAlignment="Top" Width="407" TabIndex="13" ToolTip="The fully qualified name of the provider assembly type. This provider implements the write-behind and read-through features. Use load assembly to populate this automatically. The name is case-sensitive."/>
        <Button Content="Ok" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="498,150,0,0" Name="btnOk" VerticalAlignment="Top" Width="75" Click="btnOk_Click" TabIndex="19" ToolTip="Create/Update the cache."/>
        <Button Content="Cancel" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="585,150,0,0" Name="btnCancel" VerticalAlignment="Top" Width="75" Click="btnCancel_Click" TabIndex="20" ToolTip="Close this window without making any changes."/>
        <Label Content="Write Behind Retry Interval:" Height="28" HorizontalAlignment="Left" Margin="306,136,0,0" Name="label16" ToolTip="The maximum number of connection retries to the write-behind provider. The default is -1, which means inifinite retries." VerticalAlignment="Top" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="487,138,0,0" Name="txtWBRetryInterval" Text="60" VerticalAlignment="Top" Width="47" TabIndex="11" ToolTip="The number of seconds by which time a cache item should be written to the provider after being written to the cache. This value has a minimum value of 60 seconds and a default of 300 seconds."/>
        <TextBox HorizontalAlignment="Left" Margin="290,48,0,113" Name="txtPValue" TabIndex="16" Width="234" Grid.Row="1" ToolTip="The value of the key/value pair to be added provider settings."/>
        <Label Content="Key:" Height="28" HorizontalAlignment="Left" Margin="117,45,0,0" Name="label17" VerticalAlignment="Top" Grid.Row="1" Width="45" />
        <Label Content="Value:" Height="28" HorizontalAlignment="Left" Margin="239,45,0,0" Name="label18"  VerticalAlignment="Top" Width="45" Grid.Row="1" />
        <Button Content="Add" Height="23" HorizontalAlignment="Left" Margin="530,48,0,0" Name="btnAdd" TabIndex="17" VerticalAlignment="Top" Width="63" Grid.Row="1" Click="btnAdd_Click" ToolTip="Add the key/value pair to provider settings."/>
        <Border Margin="117,84,16,43" Grid.Row="1">
            <ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="5" >
                <StackPanel>
                    <TextBox Margin="5" TextWrapping="Wrap" AcceptsReturn="True" IsReadOnly="True" Text="@{}" Name="txtProviderSettings" Height="45" Focusable="False" ToolTip="One or more key/value pairs that specify connection information for the provider. For example: @{'setting1'='value1';'setting2'='value2'}. Use add button to add key/value pair." />
                </StackPanel>
            </ScrollViewer>
        </Border>
        <Button Content="Clear" Height="23" HorizontalAlignment="Left" Margin="597,48,0,0" Name="btnClear" TabIndex="18" VerticalAlignment="Top" Width="63" Grid.Row="1" Click="btnClear_Click" ToolTip="Clear the provider settings."/>
        <Button Content="Load Assembly" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="530,13,0,0" Name="btnLoadAssembly" VerticalAlignment="Top" Width="130" Click="btnLoadAssembly_Click" TabIndex="14" ToolTip="Pick the provider that implements 'DataCacheStoreProvider' to automatically populate provider type."/>
    </Grid>
</Window>
